package com.shxc.smarttrade.old.myview;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.TextView;

import com.shxc.smarttrade.MyApplication;

/**
 * Created by jcdev1 on 2017/9/8.
 */

public class CustomTextView extends TextView {

    public CustomTextView(Context context) {
        super(context);
        init();
    }

    public CustomTextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init();

    }

    public CustomTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        if (!isInEditMode()) {
            try {
//                Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/fzltxh.ttf");
                setTypeface(MyApplication.mTypeface);
            } catch (Exception e) {

            }

        }
    }
}
